﻿<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction Id="ExporttoExcel" RegistrationType="List" RegistrationId="100" Location="CommandUI.Ribbon.ListView" Sequence="10001">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition
         Location="Ribbon.List.Actions.Controls._children">
          <Button
           Id="ExporttoExcel"
           Alt="Export list to Excel"
           Sequence="11"
           Image32by32="~site/_layouts/15/ExportoExcelinMacOS/Images/MacExportIcon.jpg"
           Image16by16="~site/_layouts/15/ExportoExcelinMacOS/Images/MacExportIconsmallscreen.jpg"
           Command="ExportToExcel"
           LabelText="Export to Excel-MacOS"
           TemplateAlias="o1"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
         Command="ExportToExcel"
         CommandAction="javascript:Export();"
         EnabledScript="javascript:exporttoexcelenable();"/>
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
  <CustomAction Id="Ribbon.Library.Actions.Scripts"
                Location="ScriptLink"
                ScriptSrc="~site/_layouts/15/ExportoExcelinMacOS/exporttoexcel.js" />
</Elements>